feat(scorecard): add MetricGroupCard with threshold buckets and data sources dialog#3667
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
|
🤖 Finished Review · ✅ Success · Started 4:34 PM UTC · Completed 4:50 PM UTC |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3667 +/- ##
==========================================
+ Coverage 54.30% 54.43% +0.13%
==========================================
Files 2349 2354 +5
Lines 89718 89802 +84
Branches 25119 25069 -50
==========================================
+ Hits 48722 48885 +163
- Misses 40648 40656 +8
+ Partials 348 261 -87
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Review — commentThis PR introduces a well-structured Three medium-severity findings are noted below — none are blocking on their own but are worth addressing to improve robustness. Findings1. Global CSS injection via unscoped
|
8c6e821 to
ed5a9ce
Compare
|
🤖 Finished Review · ✅ Success · Started 6:15 AM UTC · Completed 6:25 AM UTC |
|
@Eswaraiahsapram Looks great! Just one small comment regarding the footer: when the list gets too long, we need the text to wrap to a new line so it doesn't scroll beneath the "Close" button. Can we update that behavior? |
Thanks for the feedback @ShiranHi , I initially added horizontal scrolling for the threshold legend so users could scroll through and select/filter rules. But I agree wrapping to a new line would make it much easier for users to see all the rules at a glance and navigate/filter without needing to scroll. I'll update the legend to wrap instead. |
|
🤖 Finished Review · ✅ Success · Started 11:22 AM UTC · Completed 11:26 AM UTC |
teknaS47
left a comment
There was a problem hiding this comment.
/lgtm
Looks good to me. Tested locally.
Screen.Recording.2026-07-07.at.4.51.11.PM.mov
|
/lgtm |
|



Fix - https://redhat.atlassian.net/browse/RHIDP-14897
📋 Summary
Implements the Grid View component for the Scorecard grouped layouts feature as part of RHIDP-14897.
This PR introduces a new
MetricGroupCardcomponent that aggregates related metrics into visual threshold-based bucket tiles, allowing platform engineers to quickly understand metric status across categories at a glance.🎯 What Changed
New Components
MetricGroupCard- Displays grouped metrics as threshold bucket tiles (e.g., "3 Critical", "5 High", "12 Passed")Three-column tile layout showing count + status for each threshold evaluation
Interactive tiles that open filtered data sources dialog
Menu with "View data sources" action
DataSourcesDialog- Modal for viewing detailed metric informationSupporting Components:
ThresholdBucketTile- Individual threshold status tile with click/keyboard supportThresholdLegend- Filter chips for threshold status in dialog footerStatusIcon- Reusable status icon componentMetricGroupCardMenu- Overflow menu for card actionsRefactored Components
ScorecardEntityContentGridView- Migrated to Masonry layoutMetricGroupCardfor grouped metrics + individualScorecardcards for ungroupedInfrastructure
scorecardEntityLayoutListextension that was incorrectly pointing to GridViewdataSourcesDialog.*- Dialog UI stringsmetricGroupCard.*- Menu and card stringsbuildThresholdBuckets- Groups metrics by threshold evaluationextractPluginName- Parses plugin identifier from metric IDresolveMetricTranslation- Handles metric-specific i18nDependencies
@mui/lab(5.0.0-alpha.177) for Masonry layout@backstage/uifrom devDependencies → dependencies🧪 Testing
Comprehensive test coverage
DataSourcesDialog.test.tsx- Dialog behavior, sorting, filtering, keyboard navMetricGroupCard.test.tsx- Card rendering, menu actions, tile clicksthresholdBucketUtils.test.tsx- Bucket aggregation logicThresholdBucketTile.test.tsx- Accessibility, click/keyboard handlersThresholdLegend.test.tsx- Filter toggle interactionsScorecardEntityContentGridView.test.tsx- Layout rendering, grouping logic📸 Screenshots
Screen.Recording.2026-07-06.at.11.25.28.AM.mov
📝 Configuration Example
Hey, I just made a Pull Request!
✔️ Checklist